<?php
class Fleet extends Unit
{
	function __construct($territory)
	{
		parent::__construct($territory);
	}
	
	public function move($territory)
	{
		if ($territory instanceof Waterzone) {
			if ($this->territory->hasNeighbour($territory)) {
				parent::setTerritory($territory);
			} else {
				throw new Exception('Das Zielland ist kein Nachbarland');
			}
			
		} else {
			throw new Exception('Ung&uuml;ltiger Landtyp');
		}
	}
}
?>